﻿    <Window x:Class="ASPItalia.ModelVirtualCasting.WPF.Views.ImageEditorView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:vm="http://schemas.aspitalia.com/ModelVirtualCasting/XAML/ViewModels"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance vm:ImageEditorViewModel,IsDesignTimeCreatable=True}"
        d:DesignWidth="800"
        d:DesignHeight="600"
        WindowStyle="None"
        WindowState="Maximized"
        AllowsTransparency="True"
        Background="#62FFFFFF"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        Title="ImageEditorView">
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Button Content="X"
                Width="40"
                Height="40"
                VerticalAlignment="Top"
                HorizontalAlignment="Right"
                Click="CloseButton_Click" Style="{DynamicResource CloseButton}" />

        <Border Grid.Row="1"
                x:Name="imageContainer"
                TouchDown="imageContainer_TouchDown"
                TouchUp="imageContainer_TouchUp"
                ManipulationStarting="imageContainer_ManipulationStarting"
                ManipulationDelta="imageContainer_ManipulationDelta">

            <Image Source="{Binding ImageSource}"
                   x:Name="image"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   Stretch="None"
                   IsManipulationEnabled="True" />
        </Border>

    </Grid>
</Window>
